﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Loli.Library.WinForm
{
    public class LoliListBox : ListBox
    {
        protected override void OnDrawItem(DrawItemEventArgs e)
        {
            base.OnDrawItem(e);
            e.DrawBackground();
            e.DrawFocusRectangle();
            e.Graphics.DrawString(this.Items[e.Index].ToString(), e.Font, new SolidBrush(Color.Red), e.Bounds);
        }


        protected override void OnMeasureItem(MeasureItemEventArgs e)
        {
            base.OnMeasureItem(e);
            if (e.Index == 2)
            {
                e.ItemHeight = 50;
            }
        }     
    }
}
